package com.qf.bean;


import com.qf.enums.EmptyType;
import org.springframework.util.ObjectUtils;

public class SysDevice implements CheckEmpty{

  private String deviceId;
  private String deviceName;
  private Integer categyId;
  private Integer bindUserId;
  private Integer sceneId;
  private java.util.Date bindTime;
  private Integer isOnline;
  private java.util.Date connectTime;
  private java.util.Date lostConnectTime;
  private java.util.Date lastControlTime;
  private String currentConnectIp;
  private String connectLocation;

  private SysCategory category;

  public SysCategory getCategory() {
    return category;
  }

  public void setCategory(SysCategory category) {
    this.category = category;
  }

  @Override
  public boolean isEmpty(EmptyType emptyType) {
    switch (emptyType) {
      case ADD: return !(categyId>0)||!(bindUserId>0)||(ObjectUtils.isEmpty(deviceName) || ObjectUtils.isEmpty(categyId) || ObjectUtils.isEmpty(bindUserId) || ObjectUtils.isEmpty(sceneId) || ObjectUtils.isEmpty(bindTime) || ObjectUtils.isEmpty(isOnline));
      case UPDATE:break;
    }
   return false;
  }

  public String getDeviceId() {
    return deviceId;
  }

  public void setDeviceId(String deviceId) {
    this.deviceId = deviceId;
  }


  public String getDeviceName() {
    return deviceName;
  }

  public void setDeviceName(String deviceName) {
    this.deviceName = deviceName;
  }


  public Integer getCategyId() {
    return categyId;
  }

  public void setCategyId(Integer categyId) {
    this.categyId = categyId;
  }


  public Integer getBindUserId() {
    return bindUserId;
  }

  public void setBindUserId(Integer bindUserId) {
    this.bindUserId = bindUserId;
  }


  public Integer getSceneId() {
    return sceneId;
  }

  public void setSceneId(Integer sceneId) {
    this.sceneId = sceneId;
  }


  public java.util.Date getBindTime() {
    return bindTime;
  }

  public void setBindTime(java.util.Date bindTime) {
    this.bindTime = bindTime;
  }


  public Integer getIsOnline() {
    return isOnline;
  }

  public void setIsOnline(Integer isOnline) {
    this.isOnline = isOnline;
  }


  public java.util.Date getConnectTime() {
    return connectTime;
  }

  public void setConnectTime(java.util.Date connectTime) {
    this.connectTime = connectTime;
  }


  public java.util.Date getLostConnectTime() {
    return lostConnectTime;
  }

  public void setLostConnectTime(java.util.Date lostConnectTime) {
    this.lostConnectTime = lostConnectTime;
  }


  public java.util.Date getLastControlTime() {
    return lastControlTime;
  }

  public void setLastControlTime(java.util.Date lastControlTime) {
    this.lastControlTime = lastControlTime;
  }


  public String getCurrentConnectIp() {
    return currentConnectIp;
  }

  public void setCurrentConnectIp(String currentConnectIp) {
    this.currentConnectIp = currentConnectIp;
  }


  public String getConnectLocation() {
    return connectLocation;
  }

  public void setConnectLocation(String connectLocation) {
    this.connectLocation = connectLocation;
  }

}
